package com.yang.wfcuser.security;

import lombok.Getter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@ToString(callSuper = true)
public class UserDetails extends User {

    @Getter
    private Long id;

    public UserDetails(Long id, String username, String password, boolean enable,
                       Collection<? extends GrantedAuthority> authorities) {
        super(username, password,enable,true,true,true, authorities);
        this.id=id;
    }
}
